function getElement(cssSelector) {
  const dom = document.querySelector(cssSelector);
  const domProxy = new Proxy(dom, {
    get(target, key) {
      if (!key.startsWith('wait')) {
        return target[key];
      }
      const event = key.replace('wait', '').toLowerCase();
      return new Promise(resolve => {
        target.addEventListener('event', resolve, { once: true });
      });
    },
  });
  return domProxy;
}
(async () => {
  const btn = getElement('butten');
  while (1) {
    await btn.waitClick();
    console.log('按钮呗点击了');
  }
})();
